#mac保留登陆信息有效
#https://www.cnblogs.com/csubcc/p/15728380.html

from selenium import webdriver
from selenium.webdriver import ChromeOptions
import time

#加载cookies中已经保存的账号和密码
options = ChromeOptions()
options.add_experimental_option("debuggerAddress", "127.0.0.1:9222")
bro=webdriver.Chrome(executable_path='./chromedriver_mac_arm64/chromedriver',chrome_options=options)

bro.get("https://kyfw.12306.cn/otn/view/index.html")
#time.sleep(5)
page_text=bro.page_source
with open('./12306videw.html','w') as fp:
    fp.write(page_text)
#time.sleep(5)
bro.close
print("测试结束")